<template>
  <dv-border-box-7 id="center-row-down-chart">
    <div class="pic-tittle">厂区地址</div>
    <div class="center-row-down-chart-pic">
      <dv-flyline-chart-enhanced
        :config="config"
        style="width: 100%; height: 100%"
      />
    </div>
  </dv-border-box-7>
</template>

<script>
export default {
  name: "centerRowUpChart",
  data() {
    return {
      config: {

      },
    };
  },

  methods: {
    UpdateData() {
      const { randomExtend } = this;

      this.config = {
        points: [
          {
            name: "湘潭●江南工业",
            coordinate: [0.62, 0.47],
            halo: {
              show: true,
            },
            icon: {
              src: require("../img/mapPoint.png"),
              width: 30,
              height: 30,
            },
            text: {
              show: true,
              fontSize: 15,
            },
          },
          {
            name: "长沙",
            coordinate: [0.67, 0.39],
          },
          {
            name: "株洲",
            coordinate: [0.7, 0.54],
          },
          {
            name: "衡阳",
            coordinate: [0.62, 0.63],
          },
          {
            name: "邵阳",
            coordinate: [0.43, 0.61],
          },
          {
            name: "岳阳",
            coordinate: [0.67, 0.26],
          },
          {
            name: "常德",
            coordinate: [0.51, 0.21],
          },
          {
            name: "张家界",
            coordinate: [0.4, 0.22],
          },
          {
            name: "益阳",
            coordinate: [0.55, 0.36],
          },
          {
            name: "郴州",
            coordinate: [0.67, 0.77],
          },
          {
            name: "永州",
            coordinate: [0.51, 0.8],
          },
          {
            name: "怀化",
            coordinate: [0.34, 0.5],
          },
          {
            name: "娄底",
            coordinate: [0.5, 0.45],
          },
          {
            name: "湘西州",
            coordinate: [0.31, 0.34],
          },
        ],
        lines: [
          {
            source: "长沙",
            target: "湘潭●江南工业",
          },
          {
            source: "株洲",
            target: "湘潭●江南工业",
          },
          // {
          //   source: "衡阳",
          //   target: "湘潭●江南工业",
          // },
          // {
          //   source: "邵阳",
          //   target: "湘潭●江南工业",
          // },
          // {
          //   source: "岳阳",
          //   target: "湘潭●江南工业",
          // },
          // {
          //   source: "常德",
          //   target: "湘潭●江南工业",
          // },
          // {
          //   source: "张家界",
          //   target: "湘潭●江南工业",
          // },
          // {
          //   source: "益阳",
          //   target: "湘潭●江南工业",
          // },
          {
            source: "郴州",
            target: "湘潭●江南工业",
          },
          // {
          //   source: "永州",
          //   target: "湘潭●江南工业",
          // },
          // {
          //   source: "怀化",
          //   target: "湘潭●江南工业",
          // },
          // {
          //   source: "娄底",
          //   target: "湘潭●江南工业",
          // },
          // {
          //   source: "湘西州",
          //   target: "湘潭●江南工业",
          // },
        ],
        icon: {
          show: true,
        },
        //require()
        text: {
          show: true,
          src: require("../img/mapPoint.png"),
        },
        bgImgSrc: require("../img/hunanMapTrans.png"),
      };
    },
  },
  mounted() {
    const { UpdateData } = this;
    this.UpdateData();
  },
};
</script>

<style lang="less">
#center-row-down-chart {
  width: 100%;
  height: 62%;
  background-color: rgba(6, 30, 93, 0.5);
  border-top: 2px solid rgba(1, 153, 209, 0.5);
  box-sizing: border-box;
  margin: 20px;
  .center-row-down-chart-pic {
    width: 100%;
    height: 100%;
    margin-top: -5%;
  }
  .pic-tittle {
    font-size: 20px;
    display: flex;
    font-weight: bold;
    color: white;
    justify-content: center;
    align-items: center;
  }
}
</style>
